<?php 
/**
 * 物品相关
 *
 */

class Goods extends ApiController{

	static function add($uid, $description) {
            $uid = isset($_POST['uid']) ? intval($_POST['uid']) : '';
            $description = isset($_POST['description']) ? $_POST['description'] : '';

            return GoodsModel::add($uid, $description);
	}

        static function remove($gid) {
            $gid = isset($_POST['gid']) ? intval($_POST['gid']) : '';
            return GoodsModel::remove($gid);
	}

        static function byuser($uid) {
            $uid = isset($_POST['uid']) ? intval($_POST['uid']) : '';
            return GoodsModel::byuser($uid);
	}
}